package com.itheima.sky.controller.backend;

import com.itheima.sky.dao.OrderMapper;
import com.itheima.sky.entity.Result;
import com.itheima.sky.service.OrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description OrderController
 * @Author jiangning
 * @Date 2024-06-29
 */
@RestController
@Slf4j
@RequestMapping("/order")
public class OrderControllerBack {
    @Autowired
    OrderService orderService;
    @GetMapping("/page")
    public Result page(Integer page, Integer pageSize, String number, String beginTime, String endTime) {
        return Result.success(orderService.getOrdersInPage(page, pageSize, number, beginTime, endTime));
    }
}
